import { useNavigate } from "react-router-dom";
function withRouter(WrapperComponent) {
  return function (props) {
    let na = useNavigate();
    const router = { na };
    return <WrapperComponent {...props} router={router}></WrapperComponent>;
  };
}
export default withRouter;
